package cn.wzx.service;

import cn.wzx.dao.UserDao;
import cn.wzx.entity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    UserDao userDao;

    @Override
    public User findUserByUsername(String username) {
        User user = userDao.findUserByUsername(username);
        return user;
    }

    @Override
    public void addUser(User user) {
        user.setRole("C");
        userDao.addUser(user);
    }
}
